package com.easy.query.test.entity.school.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.school.MySchoolStudentAddress;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.SQLNavigateColumn;
import com.easy.query.core.proxy.columns.types.SQLAnyTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class MySchoolStudentAddressProxy extends AbstractProxyEntity<MySchoolStudentAddressProxy, MySchoolStudentAddress> {

    private static final Class<MySchoolStudentAddress> entityClass = MySchoolStudentAddress.class;

    public static final MySchoolStudentAddressProxy TABLE = createTable().createEmpty();

    public static MySchoolStudentAddressProxy createTable() {
        return new MySchoolStudentAddressProxy();
    }

    public MySchoolStudentAddressProxy() {
    }

    /**
     * {@link MySchoolStudentAddress#getId}
     */
    public SQLStringTypeColumn<MySchoolStudentAddressProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link MySchoolStudentAddress#getStudentId}
     */
    public SQLStringTypeColumn<MySchoolStudentAddressProxy> studentId() {
        return getStringTypeColumn("studentId");
    }

    /**
     * {@link MySchoolStudentAddress#getAddress}
     */
    public SQLStringTypeColumn<MySchoolStudentAddressProxy> address() {
        return getStringTypeColumn("address");
    }

    /**
     * {@link MySchoolStudentAddress#getSchoolStudent}
     */
    public com.easy.query.test.entity.school.proxy.MySchoolStudentProxy schoolStudent() {
        return getNavigate("schoolStudent", new com.easy.query.test.entity.school.proxy.MySchoolStudentProxy());
    }


    @Override
    public Class<MySchoolStudentAddress> getEntityClass() {
        return entityClass;
    }

    @Override
    public MySchoolStudentAddressProxy createNew() {
        return createTable();
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public MySchoolStudentAddressProxyFetcher FETCHER = new MySchoolStudentAddressProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class MySchoolStudentAddressProxyFetcher extends AbstractFetcher<MySchoolStudentAddressProxy, MySchoolStudentAddress, MySchoolStudentAddressProxyFetcher> {

        public MySchoolStudentAddressProxyFetcher(MySchoolStudentAddressProxy proxy, MySchoolStudentAddressProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link MySchoolStudentAddress#getId}
         */
        public MySchoolStudentAddressProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link MySchoolStudentAddress#getStudentId}
         */
        public MySchoolStudentAddressProxyFetcher studentId() {
            return add(getProxy().studentId());
        }

        /**
         * {@link MySchoolStudentAddress#getAddress}
         */
        public MySchoolStudentAddressProxyFetcher address() {
            return add(getProxy().address());
        }


        @Override
        protected MySchoolStudentAddressProxyFetcher createFetcher(MySchoolStudentAddressProxy cp, AbstractFetcher<MySchoolStudentAddressProxy, MySchoolStudentAddress, MySchoolStudentAddressProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new MySchoolStudentAddressProxyFetcher(cp, this, sqlSelectExpression);
        }
    }


    public static final class Fields {
        public static final String id = "id";
        public static final String studentId = "studentId";
        public static final String address = "address";

        private Fields() {
        }
    }
}
